#include <stdio.h>

int main()
{

    char * a=malloc(30);
    strcpy(a,"a Hello World!");
    printf(a);
    // free(a);

    char *arr = calloc(10, sizeof(char));//  int :(int *)
    if(arr==NULL){
        printf("calloc fail");
    }else{
        strcpy(arr,"b Hello World!");
        printf(arr);
        free(arr);
    }

    a = realloc(a, 2 * sizeof(char));
    if (a == NULL) {
        printf("Memory reallocation failed!");
        exit(1);
    }
    printf(a);
    free(a);

    return 0;
}
